package com.wuseguang.springcloud.dao.repository;

import com.wuseguang.springcloud.entity.EvaluationModelItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;

public interface EvaluationModelItemRepository extends JpaRepository<EvaluationModelItem,Integer> {

    @Transactional
    @Modifying
    @Query(value = "DELETE FROM `evaluation_model_item` WHERE `evaluation_model_id` = ?1",nativeQuery = true)
    Integer deleteByEvaluationModelId(Integer id);


}
